home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 3⁄2⁄90 / 0787-Re Standard PICT Fil-Feb90 < prev    next >
Encoding:
Text File  |  1990-03-02  |  1.3 KB  |  31 lines  |  [TEXT/GEOL]

  1. Item    1036007                         28-Feb-90        19:16PST
  2.  
  3. From:   ROSENSTEIN1                     Rosenstein, Larry
  4.  
  5. To:     D0234                           Addison Wesley, Schl Dev Suppt,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Re: Standard PICT File
  10.  
  11. It is very easy to read a PICT file.  The simplest approach is to just skp the
  12. first 512 bytes, read the rest of the file into a big handle, and treat the
  13. handle as a normal QuickDraw picture.
  14.  
  15. The only drawback is that you need enought RAM space to hold the entire PICT
  16. file.  The solution is to read the picture incrementally from disk.  This
  17. involves installing QuickDraw capture procs that read bytes of the picture from
  18. disk as QuickDraw needs them.
  19.  
  20. It turns out that reading pictures in this way is very easy.  Tech Note 154
  21. shows how to do it, althought it isn't written as a class.  The only change I
  22. would make from that code is to buffer reads from the PICT file to improve
  23. performance.  (Something like a 32K-64K buffer should do the trick.)
  24.  
  25. I have implemented a class that does this, but I'm not sure if it works with
  26. MacApp 2.0, and I would want to have DTS look at it to ensure that it is OK.
  27. Using the Tech Note, however, it should be easy to roll your own.
  28.  
  29. Larry Rosenstein
  30.  
  31.